package com.telit.firecommand.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Auther amy
 * @Describe 多媒体封装类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MultimediaDTO {

    @ApiModelProperty(value="多媒体路径")
    private String mediaUrl;

    @ApiModelProperty(value="来源")
    private String resource;

    @ApiModelProperty(value="上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;

    @ApiModelProperty(value="来源名称")
    private String resourceName;

    @ApiModelProperty(value="文件名称")
    private String fileName;

    public MultimediaDTO(String mediaUrl, String resource, Date uploadTime, String resourceName){
       this.mediaUrl = mediaUrl;
       this.resource = resource;
       this.uploadTime = uploadTime;
       this.resourceName = resourceName;
    }

}
